package com.example.mytayunapi.Mapper;

import com.example.mytayunapi.Entity.LoginLogsInfo;
import com.example.mytayunapi.Vo.LoginLogUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LoginlogsInfoMapper {
    @Insert("insert into loginlogs(School_degree,Login_ip,Login_web,os,browser) values(#{School_degree},#{Login_ip},#{Login_web},#{os},#{browser})")
    Integer InsertintoLogin(LoginLogsInfo loginLogsinfo);

    @Select("SELECT u.School_degree,u.Nick_name,u.phone,l.os,l.browser,l.Login_time FROM tayun.loginlogs l join user u on l.School_degree = u.School_degree")
    List<LoginLogUser> getLoginLogs();
}
